package xml;

import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAttribute;

/**
 * Intermediary class created to give the properties of a {@link java.awt.Rectangle Rectangle} an xml saveable form.
 * @author mylesc,varunr
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name="xmlrectangletype")
public class RectangleType {
	
	@XmlAttribute
	public int x;
	@XmlAttribute
	public int y;
	@XmlAttribute
	public int width;
	@XmlAttribute
	public int height;
	
	// no-arg constructor
	public RectangleType() {}
	
	// define getters
	public int getX() {
		return x;
	}
	public int getY() {
		return y;
	}
	public int getWidth() {
		return width;
	}
	public int getHeight() {
		return height;
	}
	
	// define mutators
	public void setX(int x) {
		this.x  = x;
	}
	public void setY(int y) {
		this.y = y;
	}
	public void setWidth(int width) {
		this.width = width;
	}
	public void setHeight(int height) {
		this.height = height;
	}
}
